#pragma once
#include <Windows.h>
#include <WinBase.h>
#include <string>

class WMutex
{

public:
	WMutex();
	~WMutex();
	void LockW();
	void UnlockW();
private:
	CRITICAL_SECTION m_cs;
};



class WLock
{

public:
	WLock(WMutex* pMutex);
	~WLock();
private:
	WMutex* m_pMutex;
};


class RWMutex:public WMutex
{
public:
	void LockR();
	void UnlockR();
};


class RLock
{
private:
	RWMutex* m_pMutex;
public:
	RLock(RWMutex* pMutex);
	~RLock();
};


HANDLE CreateProcessMutex(std::string strMutexName);